import { DvaOption } from '@/common/dva';
import { DvaInstance, Model } from 'dva-core';
import { History as RawHistory } from 'history';

namespace WxApp {
  export type ModelObject<T = any> = Model<T>;
  export type Instance = DvaInstance;
  export type History = RawHistory;
  export type RouterType = 'hash' | 'browser' | 'memory';

  export interface RouteObject {
    path: string;
    component?: Function;
    exact?: boolean;
    models?: any;
  }

  export interface RouteItem extends RouteObject {
    modelPath?: string[];
    children?: RouteItem[];
    wrapped?: boolean;
  }
}
export default WxApp;
